#include <bits/stdc++.h>
using namespace std;

int main() {
    int n, k;
    while (cin >> n >> k) {
        queue<int> Q;
        for (int i = 0; i < 2 * n; i++) {
            Q.push(i);
        }
        vector<char> res(2 * n);
        int cnt = 1;
        while (Q.size() != n) {
            int t = Q.front();
            Q.pop();
            if (cnt != k) {
                Q.push(t);
                cnt++;
            } else {
                res[t] = 'B';
                cnt = 1;
            }
        }
        for (int i = 0; i < 2 * n; i++) {
            if (!(i % 50) && i) cout << endl;
            if (res[i] == 'B') cout << res[i];
            else cout << 'G';
        }
        cout << endl << endl;
    }
    return 0;
}